package com.luminary.demo.authentication.model.security;

import java.util.ArrayList;
import java.util.Collection;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import lombok.Data;

/**
 * 
 * 通过ouath2获得的用户元数据
 * 
 * @author Administrator
 *
 */
@Data
public class UserMeta extends User {

	private static final long serialVersionUID = -3953639021396992898L;
	
	// 自定义用户信息
	private String extraInfo;

	public UserMeta(String username) {
		super(username, "", new ArrayList<GrantedAuthority>());
	}

	public UserMeta(String username, String password, Collection<? extends GrantedAuthority> authorities) {
		super(username, password, authorities);
	}
	
	public UserMeta(String username, String password, boolean enabled,
			boolean accountNonExpired, boolean credentialsNonExpired,
			boolean accountNonLocked, Collection<? extends GrantedAuthority> authorities) {
		super(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, authorities);
	}
	
}
